package org.dlsu.pdfgen.gui;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CreateXMLWindow.java
 *
 * Created on 04 12, 12, 5:32:37 PM
 */
/**
 *
 * @author jellene
 */
@SuppressWarnings("serial")
public class CreateXMLWindow extends javax.swing.JFrame {

    /** Creates new form CreateXMLWindow */
    public CreateXMLWindow() {

        initComponents();
        System.out.println("GUI started.");
        setVisible(true);
        setLocationRelativeTo(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    	
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        deptTextField = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        coursecodeTextField = new javax.swing.JTextField();
        classTextField = new javax.swing.JTextField();
        roomTextField = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        instructorTextArea = new javax.swing.JTextArea();
        collegeComboBox = new javax.swing.JComboBox();
        jLabel7 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        coursedescTextArea = new javax.swing.JTextArea();
        jPanel2 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        learningTable = new javax.swing.JTable();
        jScrollPane4 = new javax.swing.JScrollPane();
        learningTextArea = new javax.swing.JTextArea();
        jLabel9 = new javax.swing.JLabel();
        removeLOButton = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        requiredTextArea = new javax.swing.JTextArea();
        jLabel11 = new javax.swing.JLabel();
        jScrollPane6 = new javax.swing.JScrollPane();
        duedateTextArea = new javax.swing.JTextArea();
        addLOButton = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jScrollPane7 = new javax.swing.JScrollPane();
        rubricTable = new javax.swing.JTable();
        removerubricButton = new javax.swing.JButton();
        jLabel15 = new javax.swing.JLabel();
        categoryTextField = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jScrollPane8 = new javax.swing.JScrollPane();
        exemplaryTextArea = new javax.swing.JTextArea();
        jScrollPane9 = new javax.swing.JScrollPane();
        satisfactoryTextArea = new javax.swing.JTextArea();
        jScrollPane10 = new javax.swing.JScrollPane();
        developingTextArea = new javax.swing.JTextArea();
        jScrollPane11 = new javax.swing.JScrollPane();
        beginningTextArea = new javax.swing.JTextArea();
        addrubricButton = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jScrollPane12 = new javax.swing.JScrollPane();
        reqTable = new javax.swing.JTable();
        reqTextField = new javax.swing.JTextField();
        removereqButton = new javax.swing.JButton();
        addreqButton = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane13 = new javax.swing.JScrollPane();
        gradingTable = new javax.swing.JTable();
        removegradeButton = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JSeparator();
        gradeTextField = new javax.swing.JTextField();
        addgradeButton = new javax.swing.JButton();
        jLabel21 = new javax.swing.JLabel();
        componentTextField = new javax.swing.JTextField();
        jLabel22 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jScrollPane14 = new javax.swing.JScrollPane();
        planTable = new javax.swing.JTable();
        planComboBox = new javax.swing.JComboBox();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jScrollPane15 = new javax.swing.JScrollPane();
        topicTextArea = new javax.swing.JTextArea();
        weeknoTextField = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jScrollPane16 = new javax.swing.JScrollPane();
        learnactTextArea = new javax.swing.JTextArea();
        addplanButton = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jScrollPane17 = new javax.swing.JScrollPane();
        refTable = new javax.swing.JTable();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jScrollPane18 = new javax.swing.JScrollPane();
        olresTable = new javax.swing.JTable();
        removerefButton = new javax.swing.JButton();
        addrefButton = new javax.swing.JButton();
        jScrollPane19 = new javax.swing.JScrollPane();
        refTextArea = new javax.swing.JTextArea();
        olresTextArea = new javax.swing.JTextField();
        removeolresButton = new javax.swing.JButton();
        addolresButton = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        jLabel29 = new javax.swing.JLabel();
        jScrollPane20 = new javax.swing.JScrollPane();
        policyTable = new javax.swing.JTable();
        addpolicyButton = new javax.swing.JButton();
        removepolicyButton = new javax.swing.JButton();
        policyTextField = new javax.swing.JTextField();
        clearButton = new javax.swing.JButton();
        saveButton = new javax.swing.JButton();
        //
        learningModel = new javax.swing.table.DefaultTableModel(learningcols,0);
        assessmentModel = new javax.swing.table.DefaultTableModel(assesscols,0);
        gradingModel = new javax.swing.table.DefaultTableModel(gradingcols,0);
        reqModel = new javax.swing.table.DefaultTableModel(new String[]{""},0);
        planModel = new javax.swing.table.DefaultTableModel(plancols,0);
        learningComboModel = new javax.swing.DefaultComboBoxModel();
        refModel = new javax.swing.table.DefaultTableModel(new String[]{""},0);
        olresModel = new javax.swing.table.DefaultTableModel(new String[]{""},0);
        policyModel = new javax.swing.table.DefaultTableModel(new String[]{""},0);
        //
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Create XML");
        setAlwaysOnTop(true);
        setLocationByPlatform(true);
        setResizable(false);

        jTabbedPane1.setToolTipText("");
        jTabbedPane1.setOpaque(true);

        jLabel1.setText("College:");

        jLabel2.setText("Department:");

        deptTextField.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));

        jLabel3.setText("Course Code:");

        jLabel4.setText("Class Days and Class Time:");

        jLabel5.setText("Room:");

        jLabel6.setText("Instructor:");

        instructorTextArea.setColumns(20);
        instructorTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        instructorTextArea.setRows(3);
        instructorTextArea.setToolTipText("Provide name, contact details,\nand consultation hours of the instructor.");
        jScrollPane1.setViewportView(instructorTextArea);

        collegeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "CCS", "CED", "CLA", "COB", "COE", "SOE" }));
        collegeComboBox.setSelectedIndex(-1);

        jLabel7.setText("Course Description:");

        coursedescTextArea.setColumns(20);
        coursedescTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        coursedescTextArea.setRows(5);
        coursedescTextArea.setToolTipText("Provide a synopsis of the course content.");
        jScrollPane2.setViewportView(coursedescTextArea);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel1)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6)
                    .addComponent(jLabel7))
                .addGap(6, 6, 6)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
                    .addComponent(classTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
                    .addComponent(coursecodeTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
                    .addComponent(deptTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
                    .addComponent(roomTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
                    .addComponent(collegeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(collegeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(deptTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(coursecodeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(classTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(roomTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addGap(50, 50, 50)
                        .addComponent(jLabel7))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(54, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Course", jPanel1);

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel8.setText("Learning Outcomes and Final Course Output");

        learningTable.setModel(learningModel);
        learningTable.setCellSelectionEnabled(false);
        learningTable.setEnabled(true);
        learningTable.setRowSelectionAllowed(true); //
        jScrollPane3.setViewportView(learningTable);

        learningTextArea.setColumns(25);
        learningTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        learningTextArea.setRows(3);
        learningTextArea.setToolTipText("Describe the knowledge and skills that students are expected to demonstrate.\nIntegrate within and reflect through these statements of outcomes the Lasallian Guiding Principles (LGP) and College or program ELGAs.");
        jScrollPane4.setViewportView(learningTextArea);

        jLabel9.setText("Learning Outcome:");

        removeLOButton.setText("Remove");
        removeLOButton.setEnabled(false);
        removeLOButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeLOButtonActionPerformed(evt);
            }
        });

        jLabel10.setText("Required Output:");

        requiredTextArea.setColumns(25);
        requiredTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        requiredTextArea.setRows(3);
        jScrollPane5.setViewportView(requiredTextArea);

        jLabel11.setText("Due Date:");

        duedateTextArea.setColumns(25);
        duedateTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        duedateTextArea.setRows(3);
        jScrollPane6.setViewportView(duedateTextArea);

        addLOButton.setText("Add");
        addLOButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addLOButtonActionPerformed(evt);
            }
        });

        jLabel12.setFont(new java.awt.Font("Tahoma", 2, 10));
        jLabel12.setText("Note: Each LO need not have its own output or work. Outputs may be in");

        jLabel13.setFont(new java.awt.Font("Tahoma", 2, 10));
        jLabel13.setText("the form of a product to be submitted or a performance to be done (e.g. demonstration).");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 427, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel10)
                            .addComponent(jLabel11)
                            .addComponent(jLabel9))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(41, 41, 41)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(removeLOButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(addLOButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)))))
                    .addComponent(jLabel13)
                    .addComponent(jLabel12))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel9)))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(8, 8, 8)
                        .addComponent(removeLOButton)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel10))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11)
                            .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(addLOButton, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel12)
                .addGap(1, 1, 1)
                .addComponent(jLabel13)
                .addGap(15, 15, 15))
        );

        jTabbedPane1.addTab("Learning Outcome", jPanel2);

        jLabel14.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel14.setText("Rubric for Assessment");

        rubricTable.setModel(assessmentModel);
        jScrollPane7.setViewportView(rubricTable);

        removerubricButton.setText("Remove");
        removerubricButton.setEnabled(false);
        removerubricButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removerubricButtonActionPerformed(evt);
            }
        });

        jLabel15.setText("Category:");

        jLabel16.setText("Exemplary");

        jLabel17.setText("Satisfactory");

        jLabel18.setText("Developing");

        jLabel19.setText("Beginning");

        exemplaryTextArea.setColumns(20);
        exemplaryTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        exemplaryTextArea.setRows(2);
        exemplaryTextArea.setToolTipText("The submitted work manifests qualities which go beyond the requirements.");
        jScrollPane8.setViewportView(exemplaryTextArea);

        satisfactoryTextArea.setColumns(20);
        satisfactoryTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        satisfactoryTextArea.setRows(2);
        satisfactoryTextArea.setToolTipText("The submitted work manifests the required qualities.");
        jScrollPane9.setViewportView(satisfactoryTextArea);

        developingTextArea.setColumns(20);
        developingTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        developingTextArea.setRows(2);
        developingTextArea.setToolTipText("The submitted work partially manifests the required qualities. Certain aspects are either incomplete or incorrect.");
        jScrollPane10.setViewportView(developingTextArea);

        beginningTextArea.setColumns(20);
        beginningTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        beginningTextArea.setRows(2);
        beginningTextArea.setToolTipText("The submitted work does not manifest any of the requirements.");
        jScrollPane11.setViewportView(beginningTextArea);

        addrubricButton.setText("Add");
        addrubricButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addrubricButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel14)
                            .addComponent(jScrollPane7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addComponent(jLabel15)
                            .addGap(29, 29, 29)
                            .addComponent(categoryTextField)
                            .addGap(116, 116, 116)
                            .addComponent(removerubricButton))
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel17)
                                .addComponent(jLabel18)
                                .addComponent(jLabel19))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(116, 116, 116)
                                    .addComponent(addrubricButton, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE))
                                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addGap(26, 26, 26)
                        .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(jLabel14)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(6, 6, 6)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel15)
                        .addComponent(categoryTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(removerubricButton))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel16)
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(5, 5, 5)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel17)
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel19)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(addrubricButton)
                        .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Assessment", jPanel3);

        jPanel4.setToolTipText("State here other requirements (e.g., field work) or assessments (e.g., exams) that will be done to check on student progress towards the required outputs and learning outcomes.");

        jLabel20.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel20.setText("Other Requirements and Assessments");

        reqTable.setModel(reqModel);
        jScrollPane12.setViewportView(reqTable);

        removereqButton.setText("Remove");
        removereqButton.setEnabled(false);
        removereqButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removereqButtonActionPerformed(evt);
            }
        });

        addreqButton.setText("Add");
        addreqButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addreqButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(reqTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(removereqButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(addreqButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 72, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel20)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(removereqButton)
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(addreqButton)
                    .addComponent(reqTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27))
        );

        jTabbedPane1.addTab("Other Requirements", jPanel4);

        jPanel5.setToolTipText("List here the components of the final grade and their corresponding weights or percentages.\nWrite also the grading scale. Relate the grading scale to the attainment of the learning outcomes.");

        gradingTable.setModel(gradingModel);
        jScrollPane13.setViewportView(gradingTable);

        removegradeButton.setText("Remove");
        removegradeButton.setEnabled(false);
        removegradeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removegradeButtonActionPerformed(evt);
            }
        });

        addgradeButton.setText("Add");
        addgradeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addgradeButtonActionPerformed(evt);
            }
        });

        jLabel21.setText("Component:");

        jLabel22.setText("Grade:");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane13, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE)
                    .addComponent(removegradeButton, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(componentTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel22)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(gradeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(addgradeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(removegradeButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(addgradeButton)
                    .addComponent(gradeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(componentTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel21)
                    .addComponent(jLabel22))
                .addContainerGap(14, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Grading System", jPanel5);

        planTable.setModel(planModel);
        jScrollPane14.setViewportView(planTable);

        planComboBox.setModel(learningComboModel);

        jLabel23.setText("Learning Outcome:");

        jLabel24.setText("Topic:");

        topicTextArea.setColumns(20);
        topicTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        topicTextArea.setRows(2);
        jScrollPane15.setViewportView(topicTextArea);

        jLabel25.setText("Week No.");

        jLabel26.setText("Learning Activities:");

        learnactTextArea.setColumns(20);
        learnactTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        learnactTextArea.setRows(3);
        jScrollPane16.setViewportView(learnactTextArea);

        addplanButton.setText("Add");
        addplanButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addplanButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel24)
                            .addComponent(jLabel23)
                            .addComponent(jLabel26))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane15, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel6Layout.createSequentialGroup()
                                .addComponent(planComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel25))
                            .addComponent(jScrollPane16, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(addplanButton, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(weeknoTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(planComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(weeknoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel25))
                    .addComponent(jLabel23))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel24)
                    .addComponent(jScrollPane15, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel26)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(addplanButton)
                        .addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(16, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Learning Plan", jPanel6);

        jPanel7.setToolTipText("List titles of books and other sources where course content can be found. Lists at least five titles originally published or produced in 2006 or later. Listing should be in the style of the discipline (eg., APA or MLA).");

        refTable.setModel(refModel);
        jScrollPane17.setViewportView(refTable);

        jLabel27.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel27.setText("References");

        jLabel28.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel28.setText("Online Resources");

        olresTable.setModel(olresModel);
        jScrollPane18.setViewportView(olresTable);

        removerefButton.setText("Remove");
        removerefButton.setEnabled(false);
        removerefButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removerefButtonActionPerformed(evt);
            }
        });

        addrefButton.setText("Add");
        addrefButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addrefButtonActionPerformed(evt);
            }
        });

        refTextArea.setColumns(20);
        refTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
        refTextArea.setRows(1);
        jScrollPane19.setViewportView(refTextArea);

        removeolresButton.setText("Remove");
        removeolresButton.setEnabled(false);
        removeolresButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeolresButtonActionPerformed(evt);
            }
        });

        addolresButton.setText("Add");
        addolresButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addolresButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel27)
                    .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addComponent(jScrollPane19, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(addrefButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(removerefButton))
                    .addComponent(jLabel28)
                    .addComponent(jScrollPane18, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addComponent(olresTextArea, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(addolresButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(removeolresButton)))
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(jLabel27)
                .addGap(5, 5, 5)
                .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane19, 0, 0, Short.MAX_VALUE)
                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(removerefButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(addrefButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel28)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane18, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(olresTextArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(removeolresButton)
                    .addComponent(addolresButton))
                .addGap(13, 13, 13))
        );

        jTabbedPane1.addTab("References", jPanel7);

        jLabel29.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel29.setText("Class Policies");

        policyTable.setModel(policyModel);
        jScrollPane20.setViewportView(policyTable);

        addpolicyButton.setText("Add");
        addpolicyButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addpolicyButtonActionPerformed(evt);
            }
        });

        removepolicyButton.setText("Remove");
        removepolicyButton.setEnabled(false);
        removepolicyButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removepolicyButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane20, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel29)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                        .addComponent(policyTextField)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(addpolicyButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(removepolicyButton)))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(13, 13, 13)
                .addComponent(jLabel29)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane20, javax.swing.GroupLayout.DEFAULT_SIZE, 255, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(removepolicyButton)
                    .addComponent(addpolicyButton)
                    .addComponent(policyTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jTabbedPane1.addTab("Policies", jPanel8);

        clearButton.setText("Clear");
        clearButton.setName(""); // NOI18N
        clearButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                clearButtonActionPerformed(evt);
            }
        });

        saveButton.setText("Save");
        saveButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(clearButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(saveButton))
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 450, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 369, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(saveButton)
                    .addComponent(clearButton))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>

private void addLOButtonActionPerformed(java.awt.event.ActionEvent evt) {                                            
    //int x = learningTable.getRowCount() + 1;
    if (!"".equals(learningTextArea.getText()) && !"".equals(requiredTextArea.getText()) && !"".equals(duedateTextArea.getText())) {
        learningModel.addRow(new String[]{/*"LO " + x + ": " + */learningTextArea.getText(),
                        requiredTextArea.getText(), duedateTextArea.getText()} );
        
        System.out.println("LO: " + learningTable.getRowCount());//
        removeLOButton.setEnabled(true);
        learningComboModel.addElement(learningTextArea.getText());
        planComboBox.setSelectedIndex(-1);
        //clear all fields after adding
        learningTextArea.setText(null);
        requiredTextArea.setText(null);
        duedateTextArea.setText(null);
    }
}                                           

private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) {                                            
    if (javax.swing.JOptionPane.showConfirmDialog(null, 
            "Data will be lost! Confirm?", "Clear", 
                javax.swing.JOptionPane.YES_NO_OPTION) == 0) {
	dispose();
	new CreateXMLWindow().setVisible(true);
    }
}                                           

private void removeLOButtonActionPerformed(java.awt.event.ActionEvent evt) {                                               
    learningModel.removeRow(learningTable.getSelectedRow());
}                                              

private void removerubricButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                   
    assessmentModel.removeRow(rubricTable.getSelectedRow());
}                                                  

private void addrubricButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                
    int x = rubricTable.getRowCount() + 1;
    if (!"".equals(categoryTextField.getText()) && !"".equals(exemplaryTextArea.getText())
            && !"".equals(satisfactoryTextArea.getText()) && !"".equals(developingTextArea.getText())
            && !"".equals(beginningTextArea.getText())) {
        assessmentModel.addRow(new String[]{"Category " + x + ": " + categoryTextField.getText(),
                        exemplaryTextArea.getText(), satisfactoryTextArea.getText(),
                        developingTextArea.getText(), beginningTextArea.getText()} );
        
        System.out.println("rubric: " + rubricTable.getRowCount());//
        removerubricButton.setEnabled(true);
        //clear all fields after adding
        categoryTextField.setText(null);
        exemplaryTextArea.setText(null);
        satisfactoryTextArea.setText(null);
        developingTextArea.setText(null);
        beginningTextArea.setText(null);
    }
}                                               

private void addreqButtonActionPerformed(java.awt.event.ActionEvent evt) {                                             
    if (!"".equals(reqTextField.getText())) {
        reqModel.addRow(new String[]{reqTextField.getText()} );
    
        System.out.println("other req: " + reqTable.getRowCount());
        removereqButton.setEnabled(true);
        reqTextField.setText(null);
    }
}                                            

private void removereqButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                
    reqModel.removeRow(reqTable.getSelectedRow());
}                                               

private void addgradeButtonActionPerformed(java.awt.event.ActionEvent evt) {                                               

    if (!"".equals(gradeTextField.getText()) && !"".equals(componentTextField.getText()) ) {
        gradingModel.addRow(new String[]{componentTextField.getText(),gradeTextField.getText()});
    }
    System.out.println("grading: " + reqTable.getRowCount());
    removegradeButton.setEnabled(true);
    componentTextField.setText(null);
    gradeTextField.setText(null);
}                                              

private void removegradeButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                  
    gradingModel.removeRow(gradingTable.getSelectedRow());
}                                                 

private void addplanButtonActionPerformed(java.awt.event.ActionEvent evt) {                                              
    if (planComboBox.getSelectedIndex() > -1 && !"".equals(topicTextArea.getText()) &&
            !"".equals(weeknoTextField.getText()) && !"".equals(learnactTextArea.getText()) )  {
        planModel.addRow(new String[]{planComboBox.getItemAt(planComboBox.getSelectedIndex()).toString(),
                            topicTextArea.getText(), weeknoTextField.getText(), learnactTextArea.getText()});
    }
    System.out.println("learningplan: " + planTable.getRowCount());
    planComboBox.setSelectedIndex(-1);
    topicTextArea.setText(null);
    weeknoTextField.setText(null);
    learnactTextArea.setText(null);
}                                             

private void addrefButtonActionPerformed(java.awt.event.ActionEvent evt) {                                             
    if (!"".equals(refTextArea.getText())) {
        refModel.addRow(new String[]{refTextArea.getText()} );
    
        System.out.println("references: " + refTable.getRowCount());
        removerefButton.setEnabled(true);
        refTextArea.setText(null);
    }
}                                            

private void addolresButtonActionPerformed(java.awt.event.ActionEvent evt) {                                               
    if (!"".equals(olresTextArea.getText())) {
        olresModel.addRow(new String[]{olresTextArea.getText()} );
    
        System.out.println("online: " + olresTable.getRowCount());
        removeolresButton.setEnabled(true);
        olresTextArea.setText(null);
    }
}                                              

private void removerefButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                
    refModel.removeRow(refTable.getSelectedRow());
}                                               

private void removeolresButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                  
    olresModel.removeRow(olresTable.getSelectedRow());
}                                                 

private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {
    try {
        java.io.OutputStream fout;
        javax.swing.JFileChooser xmlDestination = new javax.swing.JFileChooser();
        if (xmlDestination.showSaveDialog(this) == javax.swing.JFileChooser.APPROVE_OPTION) {
            if (xmlDestination.getSelectedFile().getAbsolutePath().endsWith(".xml")) {
                fout = new java.io.FileOutputStream(xmlDestination.getSelectedFile().getAbsolutePath());
            }
            else {
                fout = new java.io.FileOutputStream(xmlDestination.getSelectedFile().getAbsolutePath() + ".xml");
            }
        java.io.OutputStream bout = new java.io.BufferedOutputStream(fout);
        java.io.OutputStreamWriter out = new java.io.OutputStreamWriter(bout);
        
        out.write("<?xml version=\"1.0\"?>\n" +
                  "<syllabus>\n" +
                  "\t<college>" + collegeComboBox.getItemAt(collegeComboBox.getSelectedIndex()).toString() + "</college>\n" +
                  "\t<department>" + deptTextField.getText() + "</department>\n" +
                  "\t<title>" + coursecodeTextField.getText() + "</title>\n" +
                  "\t<faculty>" + instructorTextArea.getText() + "</faculty>\n" +
                  "\t<time>" + classTextField.getText() + "</time>\n" +
                  "\t<room>" + roomTextField.getText() + "</room>\n" +
                  "\t<coursedesc>" + coursedescTextArea.getText() + "</coursedesc>\n\n" +
                  "\t<los>\n" +
                  "\t\t<learningdesc>On the completion of the course, the student is expected to be able to do the following:</learningdesc>\n"
                 );
        for (int i=0; i < learningTable.getRowCount(); i++) {
            out.write("\t\t<lo>" + learningModel.getValueAt(i,0) + "</lo>\n");
        }
        out.write("\t</los>\n\n");
        out.write("\t<finaloutcomes>\n" +
                  "\t<finaldesc>As evidence of attaining the above learning outcomes, the student is required to do and submit the following during the indicated dates of the term.\n\t</finaldesc>\n"
                 );
        for (int i=0; i<learningTable.getRowCount(); i++) {
                out.write("\t\t<finaloutcome>\n" +
                          "\t\t\t<lo>" + learningModel.getValueAt(i,0) + "</lo>\n" +
                          "\t\t\t<output>" + learningModel.getValueAt(i,1) + "</output>\n" +
                          "\t\t\t<date>" + learningModel.getValueAt(i,2) + "</date>\n" +
                          "\t\t</finaloutcome>\n\n");
        }
        out.write("\t</finaloutcomes>\n\n\n");
        out.write("\t<rubrics>\n");
        for (int i=0; i<rubricTable.getRowCount(); i++) {
                out.write("\t\t<rubric>\n" +
                          "\t\t\t<criteria>" + assessmentModel.getValueAt(i,0) + "</criteria>\n" +
                          "\t\t\t<exemplary>" + assessmentModel.getValueAt(i,1) + "</exemplary>\n" +
                          "\t\t\t<satisfactory>" + assessmentModel.getValueAt(i,2) + "</satisfactory>\n" +
                          "\t\t\t<developing>" + assessmentModel.getValueAt(i,3) + "</developing>\n" +
                          "\t\t\t<beginning>" + assessmentModel.getValueAt(i,4) + "</beginning>\n" +
                          "\t\t</rubric>\n");
        }
        out.write("\t</rubrics>\n\n");
        out.write("\t<others listType=\"bulleted\">\n" +
                  "\t\t<otherdesc>Aside from the final output, the student will be assessed at other times during the term by the following:\n\t\t</otherdesc>\n"
                 );
        for (int i=0; i<reqTable.getRowCount(); i++) {
        	out.write("\t\t<other>" + reqModel.getValueAt(i,0) + "</other>\n");
        }
        out.write("\t</others>\n\n");
        out.write("\t<gradings>\n" +
                  "\t\t<gradingdesc>The student will be graded according to the following:</gradingdesc>\n"
                 );
        for (int i=0; i<gradingTable.getRowCount(); i++) {
                out.write("\t\t<grading>" + gradingModel.getValueAt(i,0) + " - " + gradingModel.getValueAt(i,1) + "</grading>\n"
                         );
        }
        out.write("\t</gradings>\n\n");
        out.write("\t<learningplans>\n");
        for (int i=0; i<planTable.getRowCount(); i++) {
                out.write("\t\t<learningplan>\n" +
                          "\t\t\t<lo>" + planModel.getValueAt(i,0) + "</lo>\n" +
                          "\t\t\t<topic>" + planModel.getValueAt(i,1) + "\n\t\t\t</topic>\n" +
                          "\t\t\t<week>" + planModel.getValueAt(i,2) + "</week>\n" +
                          "\t\t\t<activities>" + planModel.getValueAt(i,3) + "</activities>\n" +
                          "\t\t</learningplan>\n");
        }
        out.write("\t</learningplans>\n\n");
        out.write("\t<references>\n");
        for (int i=0; i<refTable.getRowCount(); i++) {
            out.write("\t\t<ref>" + refModel.getValueAt(i,0) + "</ref>\n");
        }
        out.write("\t</references>\n\n");
        out.write("\t<online>\n");
        for (int i=0; i<olresTable.getRowCount(); i++) {
            out.write("\t\t<resource>" + olresModel.getValueAt(i,0) + "</resource>\n");
        }
        out.write("\t</online>\n\n");
        out.write("\t<policies listType = \"bulleted\">\n");
        for (int i=0; i<policyTable.getRowCount(); i++) {
            out.write("\t\t<policy>" + policyModel.getValueAt(i,0) + "</policy>\n");
        }
        out.write("\t</policies>\n");
        out.write("</syllabus>");  
        out.flush();
        out.close();
        System.out.println("XML generated.");
        this.setVisible(false);
        } // end of if
    } catch (Exception e) {
        e.printStackTrace();
    }
}

private void addpolicyButtonActionPerformed(java.awt.event.ActionEvent evt) {
    if (!"".equals(policyTextField.getText())) {
        policyModel.addRow(new String[]{policyTextField.getText()} );
    
        System.out.println("policy: " + policyTable.getRowCount());
        removepolicyButton.setEnabled(true);
        policyTextField.setText(null);
    }
}

private void removepolicyButtonActionPerformed(java.awt.event.ActionEvent evt) {
    policyModel.removeRow(policyTable.getSelectedRow());
}

    // Variables declaration - do not modify
    private javax.swing.JButton addLOButton;
    private javax.swing.JButton addgradeButton;
    private javax.swing.JButton addolresButton;
    private javax.swing.JButton addplanButton;
    private javax.swing.JButton addpolicyButton;
    private javax.swing.JButton addrefButton;
    private javax.swing.JButton addreqButton;
    private javax.swing.JButton addrubricButton;
    private javax.swing.JTextArea beginningTextArea;
    private javax.swing.JTextField categoryTextField;
    private javax.swing.JTextField classTextField;
    private javax.swing.JButton clearButton;
    private javax.swing.JComboBox collegeComboBox;
    private javax.swing.JTextField componentTextField;
    private javax.swing.JTextField coursecodeTextField;
    private javax.swing.JTextArea coursedescTextArea;
    private javax.swing.JTextField deptTextField;
    private javax.swing.JTextArea developingTextArea;
    private javax.swing.JTextArea duedateTextArea;
    private javax.swing.JTextArea exemplaryTextArea;
    private javax.swing.JTextField gradeTextField;
    private javax.swing.JTable gradingTable;
    private javax.swing.JTextArea instructorTextArea;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane18;
    private javax.swing.JScrollPane jScrollPane19;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane20;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextArea learnactTextArea;
    private javax.swing.JTable learningTable;
    private javax.swing.JTextArea learningTextArea;
    private javax.swing.JTable olresTable;
    private javax.swing.JTextField olresTextArea;
    private javax.swing.JComboBox planComboBox;
    private javax.swing.JTable planTable;
    private javax.swing.JTable policyTable;
    private javax.swing.JTextField policyTextField;
    private javax.swing.JTable refTable;
    private javax.swing.JTextArea refTextArea;
    private javax.swing.JButton removeLOButton;
    private javax.swing.JButton removegradeButton;
    private javax.swing.JButton removeolresButton;
    private javax.swing.JButton removepolicyButton;
    private javax.swing.JButton removerefButton;
    private javax.swing.JButton removereqButton;
    private javax.swing.JButton removerubricButton;
    private javax.swing.JTable reqTable;
    private javax.swing.JTextField reqTextField;
    private javax.swing.JTextArea requiredTextArea;
    private javax.swing.JTextField roomTextField;
    private javax.swing.JTable rubricTable;
    private javax.swing.JTextArea satisfactoryTextArea;
    private javax.swing.JButton saveButton;
    private javax.swing.JTextArea topicTextArea;
    private javax.swing.JTextField weeknoTextField;
    // End of variables declaration
    private javax.swing.table.DefaultTableModel learningModel, assessmentModel, reqModel, gradingModel, planModel, refModel, olresModel, policyModel;
    String[] learningcols = {"Learning Outcome","Required Output","Due Date"};
    String[] assesscols = {"Criteria","Exemplary","Satisfactory","Developing","Beginning"};
    String[] gradingcols = {"Component","Grade"};
    String[] plancols = {"Learning Outcome","Topic","Week No.","Learning Activities"};
    private javax.swing.DefaultComboBoxModel learningComboModel;

}
